package com.sskj.lib.util;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.utils.EncryptUtils;

public class RsaUtil {
    public static String priviteKey = OkGo.getInstance().getPriKey();

    public static String privateDecrypt(String data) {
        StringBuilder stringBuilder = new StringBuilder();
        String[] split = data.split("=");
        for (String s : split) {
            stringBuilder.append(new String(EncryptUtils.decryptRSA(org.google.binary.Base64.decodeBase64(s.getBytes()), EncryptUtils.base64Decode(priviteKey.getBytes()), false, "RSA/ECB/PKCS1Padding")));
        }
        return stringBuilder.toString();
    }
}
